package Java中的集合.ArrayListApply;

/**
 * @Auther:云尚学Java
 */
public class Student {
    private String name;  //学生姓名
    private int score;    //学生分数
    public Student(){

    }

    public Student(String name, int score) {
        this.name = name;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }
    //toString()方法，用于将对象属性转换为字符串打印输出

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", score=" + score +
                '}';
    }
}
